package com.onesports.intelligent.k12.polarlight.controller.operation.order;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.onesports.intelligent.k12.polarlight.common.utils.ResultUtil;
import com.onesports.intelligent.k12.polarlight.constant.ApiPathConstants;
import com.onesports.intelligent.k12.polarlight.domain.dto.operation.CashPageOrderDTO;
import com.onesports.intelligent.k12.polarlight.domain.vo.order.CashOrderPageVO;
import com.onesports.intelligent.k12.polarlight.service.order.OrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * @author chenrl
 **/
@Api(tags = "运营端-运营管理-提现记录")
@RestController
@RequiredArgsConstructor
@RequestMapping(ApiPathConstants.CASH)
public class CashController {

    private final OrderService orderService;

    @ApiOperation("分页展示提现记录")
    @GetMapping("/select-page")
    public ResponseEntity<IPage<CashOrderPageVO>> selectPage(@Valid CashPageOrderDTO cashPageOrderDTO) {
        return ResultUtil.success(orderService.selectCashPage(new Page<CashOrderPageVO>(cashPageOrderDTO.getPage(),cashPageOrderDTO.getRow()),cashPageOrderDTO));
    }
}













